#pragma once


#define  FDE_FILTER_NAME  L".FFEncoder Filter"

#include "ffFileSink.h"
#include <initguid.h>
#include <string>
using namespace std;


DEFINE_GUID(CLSID_FDEMuxFilter, 
			0xff54dc74, 0x5e94, 0x445a, 0x82, 0x6a, 0x9a, 0x79, 0xa, 0x3d, 0x61, 0x13);


class CFFEncodeInputPin;

class CFFEncodeFilter : public CBaseFilter
					  , public CCritSec					  

{
public:
	CFFEncodeFilter(LPUNKNOWN lpunk, HRESULT* phr);
	virtual ~CFFEncodeFilter(void);
	static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);

	DECLARE_IUNKNOWN
	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);

	virtual int GetPinCount();
	virtual CBasePin* GetPin(int n);	

	STDMETHODIMP Stop();
	STDMETHODIMP Pause();
	STDMETHODIMP Run(REFERENCE_TIME tStart);

private:
	wstring m_fileName;
	CFFEncodeInputPin* m_pInputAudioPin;
	CFFEncodeInputPin* m_pInputVideoPin;
	CFileSinkFilter filssink;


};

